package com.jiangjun.fetch;

import com.mongodb.BasicDBObject;
import com.mongodb.DBObject;

public class FetchRss {

	private String id;
	private String parent_id;
	private String parent_name;
	private String url;
	private String title;
	private String des;
	private String date;
	private String xpath;
	private String type;// 0为Rss，1为图片，2为文本
	private String isRssXml;// 是否为Xml格式的Rss源，1为是,0为否
	private String img_path;// 图片路径
	private String min_img_path;// 缩略图图片路径
	private String txt_path;// 文本路径
	private String isDelete;// 逻辑删除

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getXpath() {
		return xpath;
	}

	public void setXpath(String xpath) {
		this.xpath = xpath;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getParent_id() {
		return parent_id;
	}

	public void setParent_id(String parent_id) {
		this.parent_id = parent_id;
	}

	public String getIsRssXml() {
		return isRssXml;
	}

	public void setIsRssXml(String isRssXml) {
		this.isRssXml = isRssXml;
	}

	public String getImg_path() {
		return img_path;
	}

	public void setImg_path(String img_path) {
		this.img_path = img_path;
	}

	public String getTxt_path() {
		return txt_path;
	}

	public void setTxt_path(String txt_path) {
		this.txt_path = txt_path;
	}

	public String getMin_img_path() {
		return min_img_path;
	}

	public void setMin_img_path(String min_img_path) {
		this.min_img_path = min_img_path;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

	public String getParent_name() {
		return parent_name;
	}

	public void setParent_name(String parent_name) {
		this.parent_name = parent_name;
	}

	public DBObject toDbObject() {
		DBObject object = new BasicDBObject();
		if (this.id != null) {
			object.put("id", this.id);
		}
		if (this.parent_id != null) {
			object.put("parent_id", this.parent_id);
		}
		if (this.parent_name != null) {
			object.put("parent_name", this.parent_name);
		}
		if (this.url != null) {
			object.put("url", this.url);
		}
		if (this.des != null) {
			object.put("des", this.des);
		}
		if (this.date != null) {
			object.put("date", this.date);
		}
		if (this.xpath != null) {
			object.put("xpath", this.xpath);
		}
		if (this.type != null) {
			object.put("type", this.type);
		}
		if (this.title != null) {
			object.put("title", this.title);
		}
		if (this.isRssXml != null) {
			object.put("isRssXml", this.isRssXml);
		}
		if (this.img_path != null) {
			object.put("img_path", this.img_path);
		}
		if (this.min_img_path != null) {
			object.put("min_img_path", this.min_img_path);
		}
		if (this.txt_path != null) {
			object.put("txt_path", this.txt_path);
		}
		if (this.isDelete != null) {
			object.put("isDelete", this.isDelete);
		}
		return object;
	}

}
